package com.ideaplugin.datamanager.common;

import lombok.Getter;

/**
 * Created on 2023/10/18.
 *
 * @author zhaojb
 */
public enum CommonValidEnum {
    valid(1), invalid(0),
    ;

    @Getter
    private Integer value;

    CommonValidEnum(Integer value) {
        this.value = value;
    }

    public static CommonValidEnum getByValue(Integer value) {
        final CommonValidEnum[] values = CommonValidEnum.values();
        for (CommonValidEnum commonValidEnum : values) {
            if (commonValidEnum.value == value) {
                return commonValidEnum;
            }
        }
        return null;
    }

}
